import type { Route } from '../index.type'
import Layout from '@/layout/index.vue'
import { createNameComponent } from '../createNode'
const route: Route[] = [
  {
    path: '/teacher',
    name: 'teacher',
    component: Layout,
    redirect: '/teacher/home',
    meta: { title: 'message.menu.teacher.name'   },
    alwayShow: true,
    children: [
      {
        path: 'home',
        name: 'teacherHome',
        component: createNameComponent(() => import('@/views/main/teacher/home/index.vue')),
        meta: { title: 'message.menu.teacher.home' , cache: true }
      },
      {
        path: 'info',
        name: 'teacherInfo',
        component: createNameComponent(() => import('@/views/main/teacher/info/index.vue')),
        meta: { title: 'message.menu.teacher.info', cache: true  }
      },
      {
        path: 'joinCourse',
        name: 'teacherJoinCourse',
        component: createNameComponent(() => import('@/views/main/public/publicPage/joinCourse.vue')),
        meta: { title: 'message.menu.teacher.joinCourse' , cache: true }
      },
      {
        path: 'createCourse',
        name: 'teacherCreateCourse',
        component: createNameComponent(() => import('@/views/main/teacher/forms/createCourseForm.vue')),
        meta: { title: 'message.menu.teacher.createCourse' }
      },
      {
        path: 'editCourse',
        name: 'editCourse',
        component: createNameComponent(() => import('@/views/main/teacher/forms/editCourseForm.vue')),
        meta: { title: 'message.menu.teacher.editCourse' }
      },
      {
        path: 'courseDetail',
        name: 'teacherCourseDetail',
        component: createNameComponent(() => import('@/views/main/teacher/home/courseDetail/index.vue')),
        meta: { title: 'message.menu.teacher.courseDetail' }
      },
      {
        path: 'createTask',
        name: 'createTask',
        component: createNameComponent(() => import('@/views/main/teacher/forms/createTaskForm.vue')),
        meta: { title: 'message.menu.teacher.createTask' }
      },
      
      {
        path: 'taskInfo',
        name: 'teacherTaskInfo',
        component: createNameComponent(() => import('@/views/main/teacher/home/courseDetail/task/taskInfo.vue')),
        meta: { title: 'message.menu.teacher.taskInfo'  }
      },
      {
        path: 'correct',
        name: 'correct',
        component: createNameComponent(() => import('@/views/main/task/correct.vue')),
        meta: { title: 'message.menu.teacher.correct'  }
      },
    ]
  }
]

export default route